#include  <cstdio>
#include  <ctype.h>
#include  <string>
#include  <iostream>
using namespace std;

void fn(string &s)
{
	int n = s.size();
	for( int i = 0; i < n  ; ++i )
		if(isupper(s[i]))
			s[i] = ((s[i]- 'A' + 26 - 5) % 26) + 'A';
	
}


int main(int argc, char *argv[])
{
	string ss;
	cin >> ss;

	while( ss != "ENDOFINPUT" )
	{
		cin >> ss;
		fn(ss);
		cout << ss ;
		while( true )
		{
			cin >> ss;
			if( ss == "END" )
				break;

			fn(ss);
			cout << " " << ss;
		}
		printf("\n");
		cin >> ss;
	}
}
